Google Chromeのfetch()のタイムアウトの時間
検証コード
code:js
(async () => {
const start = new Date();
try {
} catch(err) {
console.error(err);
}
const end = new Date();
console.log(${(end - start) / 1000} sec)
})()
結果
120.165 sec
何回かやってみて、いつも120.xx secだった。
だいたい2分ぐらいに設定されているよう。
fetch()のタイムアウトは設定できないので、Chromeのソースコード内で設定されている値のだと思われる。 It doesn't have a specified default; the specification doesn't discuss timeouts at all.